package kingiis.utils.simpleapp;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.Nullable;

import butterknife.ButterKnife;
import kingiis.utils.simpleapp.anno.Anno;

/**
 * Created by King on 2017/12/29 0029.
 */

public abstract class BAct extends Activity {
    public Activity context = this;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Anno.bind(this);
        ButterKnife.inject(this);
        initListener();
        initView();
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    @Override
    protected void onDestroy() {
        onFinish().removeCallbacksAndMessages(null);
        super.onDestroy();
    }

    public abstract void initView();

    public abstract void initListener();

    public abstract Handler onFinish();
}
